﻿using System.Data;
using System.Data.Common;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Storage;

namespace BaseRepository.Db.UnitOfWork;

public interface IUnitOfWork
{

    DbContext GetDbClient();
    IDbConnection GetDbConnection();
    Task<IDbContextTransaction> BeginTranAsync();

    Task CommitTranAsync();
    Task RollbackTranAsync();

    Task<int> SaveDbContextAsync();
}